<template>
  <div class="header">
    <van-nav-bar v-if="isBackShow" @click-left="$router.back()" :title="title" left-text="返回" left-arrow></van-nav-bar>
    <van-nav-bar v-else :title="title" ></van-nav-bar>
  </div>
</template>

<script>
import { mapState } from 'vuex'
export default {
  name: 'Header',
  computed: {
    ...mapState(['isBackShow', 'title'])
  }
}
</script>

<style>

</style>
